package com.rainng.coursesystem.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rainng.coursesystem.controller.admin.vo.SysUserQueryReqDTO;
import com.rainng.coursesystem.model.entity.RoleEntity;
import com.rainng.coursesystem.model.entity.UserRoleEntity;
import com.rainng.coursesystem.model.shitong.CheckFileVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface CheckFileMapper {

    List<String> getNACodes();

    List<Map<String, String>> getCodesByPrj(String prjNum, String veType);

    List<Map<String,String>> getAllCodes(String veType);
    List<Map<String,String>> getDicCodes();
    int updateFileInfoByPrjNumAndFilename(String prjNum,  String id,String validtime);

    int saveFileInfo(String prjNum, int filetype, String filename, String fname, String veType, String uploadtime);

    int saveFileInfoWithDocx(String prjNum, int filetype, String filename, String fname,String info, String veType, String uploadtime,long uploadtimelong, String remark);

//    List<String> selectNameByDocxName(String fullname);

    //int updateFileInfoCacheLog(String prjNum,String filename,String log);

    int confirmFileInfo(String prjNum,Integer id);

    int countInfoByPrj(@Param("po") CheckFileVo po);

    IPage<Object> queryInfoByPrj(@Param("po") CheckFileVo po, Page<Object> pageParam);

    int countInfoByPrjAndFileName(String prjNum, String filename);

    int countFileInfoCache(String prjNum,String filename);

    int saveFileInfoCache(String prjNum,String filename,String info);

    int updateFileInfoCache(String prjNum,String filename,String info);

    String getFileInfoCache(String prjNum,String filename);

    int deleteFileInfoCache(String prjNum,String filename);

   //

   List<Integer> selectIdentifiedMarkByFilename(String prjNum,String filename);

   //无前缀
   List<Integer> selectIdentifiedMarkByFname(String prjNum,String fname);


   Map<String, String> selectFileInfoByPrjNumAndFilename(String prjNum, String filename);

   List<Map<String, String>> selectFileInfoByPrjNumAndFname(String prjNum, String fname);


//   //docx映射名称 预留
//   List<Integer> selectIdentifiedMarkByInfo(String prjNum,String fname);
}
